package com.design.observer.genernal;


public class ObServerTest {

    public static void main(String[] args) {
        System.out.println("==============");
        // 被观察者
        Subject<String> observable = new ConcreteSubject<>();
        // 观察者
        ObServer<String> obServer = new ConcreteObserver<>();
        // 注册
        observable.attach(obServer);
        // 通知
        observable.notify("hello");
        System.out.println("==============");

    }
}
